package com.ruoyi.assignments.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.assignments.mapper.ExpertAssignmentsMapper;
import com.ruoyi.assignments.domain.ExpertAssignments;
import com.ruoyi.assignments.service.IExpertAssignmentsService;

/**
 * 专家分配中间表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-24
 */
@Service
public class ExpertAssignmentsServiceImpl extends ServiceImpl<ExpertAssignmentsMapper,ExpertAssignments> implements IExpertAssignmentsService
{
    @Autowired
    private ExpertAssignmentsMapper expertAssignmentsMapper;

    /**
     * 查询专家分配中间表
     * 
     * @param assignmentId 专家分配中间表主键
     * @return 专家分配中间表
     */
    @Override
    public ExpertAssignments selectExpertAssignmentsByAssignmentId(Long assignmentId)
    {
        return expertAssignmentsMapper.selectExpertAssignmentsByAssignmentId(assignmentId);
    }

    /**
     * 查询专家分配中间表列表
     * 
     * @param expertAssignments 专家分配中间表
     * @return 专家分配中间表
     */
    @Override
    public List<ExpertAssignments> selectExpertAssignmentsList(ExpertAssignments expertAssignments)
    {
        return expertAssignmentsMapper.selectExpertAssignmentsList(expertAssignments);
    }

    /**
     * 新增专家分配中间表
     * 
     * @param expertAssignments 专家分配中间表
     * @return 结果
     */
    @Override
    public int insertExpertAssignments(ExpertAssignments expertAssignments)
    {
        return expertAssignmentsMapper.insertExpertAssignments(expertAssignments);
    }

    /**
     * 修改专家分配中间表
     * 
     * @param expertAssignments 专家分配中间表
     * @return 结果
     */
    @Override
    public int updateExpertAssignments(ExpertAssignments expertAssignments)
    {
        return expertAssignmentsMapper.updateExpertAssignments(expertAssignments);
    }

    /**
     * 批量删除专家分配中间表
     * 
     * @param assignmentIds 需要删除的专家分配中间表主键
     * @return 结果
     */
    @Override
    public int deleteExpertAssignmentsByAssignmentIds(Long[] assignmentIds)
    {
        return expertAssignmentsMapper.deleteExpertAssignmentsByAssignmentIds(assignmentIds);
    }

    /**
     * 删除专家分配中间表信息
     * 
     * @param assignmentId 专家分配中间表主键
     * @return 结果
     */
    @Override
    public int deleteExpertAssignmentsByAssignmentId(Long assignmentId)
    {
        return expertAssignmentsMapper.deleteExpertAssignmentsByAssignmentId(assignmentId);
    }
}
